<?php if (!defined('__TYPECHO_ROOT_DIR__')) exit; ?>
<?php $this->need('header.php'); ?>

<div class="main-container">
    <div class="col-mb-12 col-8" id="main" role="main">
        <article class="post" itemscope itemtype="http://schema.org/BlogPosting">
            <?php if($this->fields->banner): ?>
            <div class="post-banner">
                <img src="<?php echo $this->fields->banner; ?>" alt="<?php $this->title() ?>">
            </div>
            <?php endif; ?>
            
            <div class="post-content-wrapper">
                <h1 class="post-title" itemprop="name headline">
                    <?php $this->title() ?>
                </h1>
                
                <ul class="post-meta">
                    <li itemprop="author" itemscope itemtype="http://schema.org/Person">
                        <i class="fas fa-user"></i>
                        <a itemprop="name" href="<?php $this->author->permalink(); ?>" rel="author"><?php $this->author(); ?></a>
                    </li>
                    <li>
                        <i class="fas fa-calendar"></i>
                        <time datetime="<?php $this->date('c'); ?>" itemprop="datePublished"><?php $this->date('Y-m-d'); ?></time>
                    </li>
                    <li>
                        <i class="fas fa-folder"></i>
                        <?php $this->category(','); ?>
                    </li>
                    <li>
                        <i class="fas fa-eye"></i>
                        <?php get_post_view($this) ?>次阅读
                    </li>
                </ul>
                
                <div class="post-content" itemprop="articleBody">
                    <?php $this->content(); ?>
                </div>
                
                <div class="post-tags" itemprop="keywords">
                    <?php if ($this->tags): ?>
                    <i class="fas fa-tags"></i>
                    <?php $this->tags(', ', true, '暂无标签'); ?>
                    <?php endif; ?>
                </div>
                
                <div class="post-near">
                    <div class="post-near-item prev">
                        <?php $this->thePrev('<i class="fas fa-angle-left"></i> %s', '已是最早的文章'); ?>
                    </div>
                    <div class="post-near-item next">
                        <?php $this->theNext('%s <i class="fas fa-angle-right"></i>', '已是最新的文章'); ?>
                    </div>
                </div>
            </div>
        </article>

        <?php $this->need('comments.php'); ?>
    </div>

    <?php $this->need('sidebar.php'); ?>
</div>

<?php $this->need('footer.php'); ?>
